package com.sola_aventuro.adventure.gui;

import java.awt.BorderLayout;
import java.awt.FlowLayout;

import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JSpinner;
import javax.swing.JTextArea;
import javax.swing.border.TitledBorder;

import com.sola_aventuro.adventure.gui.helpers.Strings;

public class ScenePanel extends JPanel {

	private Strings strings = new Strings();
	private static final long serialVersionUID = 1L;
	private JPanel jPanel = null;
	private JLabel jLabel = null;
	private JSpinner jSpinner = null;
	private JScrollPane jScrollPane = null;
	private JTextArea jTextArea = null;
	private JPanel jPanel1 = null;
	private JPanel jPanel2 = null;
	private JPanel jPanel3 = null;
	private JButton btAddLink = null;
	private JButton btRemoveLink = null;
	private JButton btEditLink = null;
	private LinkPanel linkPanel = null;

	/**
	 * This is the default constructor
	 */
	public ScenePanel() {
		super();
		initialize();
	}

	/**
	 * This method initializes this
	 * 
	 * @return void
	 */
	private void initialize() {
		this.setSize(395, 200);
		this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
		this.add(getJPanel(), null);
		this.add(getJPanel1(), null);
		this.add(getJPanel2(), null);
	}

	/**
	 * This method initializes jPanel	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJPanel() {
		if (jPanel == null) {
			jLabel = new JLabel();
			jLabel.setText(strings._("number"));
			jPanel = new JPanel();
			jPanel.setLayout(new BoxLayout(getJPanel(), BoxLayout.X_AXIS));
			jPanel.add(jLabel, null);
			jPanel.add(getJSpinner(), null);
		}
		return jPanel;
	}

	/**
	 * This method initializes jSpinner	
	 * 	
	 * @return javax.swing.JSpinner	
	 */
	private JSpinner getJSpinner() {
		if (jSpinner == null) {
			jSpinner = new JSpinner();
		}
		return jSpinner;
	}

	/**
	 * This method initializes jScrollPane	
	 * 	
	 * @return javax.swing.JScrollPane	
	 */
	private JScrollPane getJScrollPane() {
		if (jScrollPane == null) {
			jScrollPane = new JScrollPane();
			jScrollPane.setViewportView(getJTextArea());
		}
		return jScrollPane;
	}

	/**
	 * This method initializes jTextArea	
	 * 	
	 * @return javax.swing.JTextArea	
	 */
	private JTextArea getJTextArea() {
		if (jTextArea == null) {
			jTextArea = new JTextArea();
		}
		return jTextArea;
	}

	/**
	 * This method initializes jPanel1	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJPanel1() {
		if (jPanel1 == null) {
			jPanel1 = new JPanel();
			jPanel1.setLayout(new BorderLayout());
			jPanel1.setBorder(BorderFactory.createTitledBorder(null, strings._("text"), TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, null, null));
			jPanel1.add(getJScrollPane(), BorderLayout.CENTER);
		}
		return jPanel1;
	}

	/**
	 * This method initializes jPanel2	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJPanel2() {
		if (jPanel2 == null) {
			jPanel2 = new JPanel();
			jPanel2.setLayout(new BoxLayout(getJPanel2(), BoxLayout.Y_AXIS));
			jPanel2.add(getJPanel3(), null);
			jPanel2.add(getLinkPanel(), null);
		}
		return jPanel2;
	}

	/**
	 * This method initializes jPanel3	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJPanel3() {
		if (jPanel3 == null) {
			jPanel3 = new JPanel();
			jPanel3.setLayout(new FlowLayout());
			jPanel3.add(getBtAddLink(), null);
			jPanel3.add(getBtEditLink(), null);
			jPanel3.add(getBtRemoveLink(), null);
		}
		return jPanel3;
	}

	/**
	 * This method initializes btAddLink	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getBtAddLink() {
		if (btAddLink == null) {
			btAddLink = new JButton();
			btAddLink.setText(strings._("add_link"));
		}
		return btAddLink;
	}

	/**
	 * This method initializes btRemoveLink	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getBtRemoveLink() {
		if (btRemoveLink == null) {
			btRemoveLink = new JButton();
			btRemoveLink.setText(strings._("remove_link"));
		}
		return btRemoveLink;
	}

	/**
	 * This method initializes btEditLink	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getBtEditLink() {
		if (btEditLink == null) {
			btEditLink = new JButton();
			btEditLink.setText(strings._("edit_link"));
		}
		return btEditLink;
	}

	/**
	 * This method initializes linkPanel	
	 * 	
	 * @return com.sola_aventuro.adventure.gui.LinkPanel	
	 */
	private LinkPanel getLinkPanel() {
		if (linkPanel == null) {
			linkPanel = new LinkPanel();
		}
		return linkPanel;
	}

}  //  @jve:decl-index=0:visual-constraint="10,10"
